export default {
  getUserName(state, userName) {
    state.userName = userName;
  },

  clearUserName(state) {
    state.userName = '';
  },

  getUsers(state, users) {
    state.users = users;
  },

  //请求前
  beforeReq(state) {
    state.tip = true;
    state.loading = false;
    state.none = false;
  },
  //请求中
  onReq(state) {
    state.tip = false;
    state.loading = true;
    state.none = false;
  },
  //请求后 无用户
  afterReqNoBody(state) {
    state.tip = false;
    state.loading = false;
    state.none = true;
  },
  //请求后 有用户
  afterReqHasBody(state) {
    state.tip = false;
    state.loading = false;
    state.none = false;
  },
};
